package model;

import java.awt.Component;
import java.awt.Panel;

import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

import view.Stijl;

public class Slide extends PresenteerbareCollectie {
	@Override
	public Component toon() {
		Stijl stijl = geefRelevanteStijl();
		
		Panel resultPanel = new Panel();
		pasStijltoe(resultPanel, stijl);
		
		resultPanel.setLayout(new BoxLayout(resultPanel, BoxLayout.Y_AXIS));
		if (stijl.logo != null)
		{
			resultPanel.add(new JLabel(new ImageIcon(stijl.logo)));
		}
		for (Presenteerbaar item : getItems())
		{
			resultPanel.add(item.toon());
			
		}
		if (stijl.toonSlideNummer)
		{
			JLabel slideLabel = new JLabel();
			slideLabel.setName("slideNummer");
			resultPanel.add(slideLabel);
		}
		return resultPanel;
	}

}
